Release 10.1A: OpenEdge Development:
Web Services
Managing a SOAP fault
On detecting a SOAP fault, OpenEdge automatically creates a SOAP fault object for it. This object contains information from each child element of the response message
<Fault>element. Like theERROR-STATUShandle information, OpenEdge makes this object available only until the next statement executes with theNO-ERRORoption.Table 12–2 lists the attributes on the SOAP fault object, which contains no methods.
As you can see, these attributes provide access to all the elements of a SOAP fault you might encounter.
Because the
<detail>element has essentially no standard definition, and can contain any elements that the Web service chooses to generate, OpenEdge provides another object, the SOAP fault-detail object to return this information to the 4GL application. If the SOAP fault message contains a<detail>element, theSOAP-FAULT-DETAILattribute on the SOAP fault object handle returns a handle to the SOAP fault-detail object that is generated for it. Otherwise, this attribute returns the Unknown value (?). Like the SOAP fault object, OpenEdge makes the SOAP fault-detail object available only until the next 4GL statement that executes with theNO-ERRORoption.Table 12–3 lists the single attribute and Table 12–4 lists the methods of the SOAP fault-detail object.
Table 12–3: SOAP fault-detail object attributes Attribute Type Description Returns the handle type,"SOAP-FAULT-DETAIL".
The
GET-NODE()andGET-SERIALIZED()methods provide access to the elements of the SOAP fault detail information in exactly the same way as they provide access to SOAP header entries for a SOAP header ( Chapter 11 "Handling SOAP Message Headers in the Progress 4GL").The general approach to managing SOAP fault detail elements is identical to retrieving and scanning the header entries of a SOAP response header. The structure of elements that make up the SOAP fault detail information is completely undefined. For more information, see the documentation available for the Web service you are accessing.
As with SOAP headers, if the WSDL Analyzer can identify a temp-table or ProDataSet definition that maps to the SOAP fault detail, you can use the
GET-SERIALIZED( )method in conjunction with theREAD-XML( )method of the documented 4GL object (temp-table or ProDataSet) to access the SOAP fault detail data. However, this is unlikely and you most often must access the data using a DOM tree or the 4GL SAX reader. For more information on how the Analyzer might identify a temp-table or ProDataSet to access the SOAP fault detail, see the sections on complex data in Chapter 8, " Analyzing WSDL for Progress 4GL Access to Web Services." For more information on the 4GL DOM, SAX, and temp-table/ProDataSet XML features, see OpenEdge Development: Programming Interfaces .
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |